package com.example.service.teacher;

import com.example.entity.DTO.StudentCourseDetailDTO;
import com.example.entity.StudentCourse;
import com.example.mapper.StudentCourseMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GradeService {
    @Resource
    private StudentCourseMapper studentCourseMapper;


    public List<StudentCourseDetailDTO> selectAllGrade(String courseName, String studentName, Integer teacherId) {
        return studentCourseMapper.selectAllGradeByCourseNameAndStudentNameAndTeacherId(courseName, studentName, teacherId);
    }

    public void updateGrade(StudentCourse studentCourse) {
        studentCourseMapper.updateScoreById(studentCourse);
    }
}
